<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<title>MeteoCal - Homepage</title>
</h:head>
<h:body>

<div id="barraAcceso" align="right">	
	<h:link outcome="users/index" value="Login" />
	o
	<h:link outcome="register" value="Signin" />
</div>

<div id="logoHomePage" align="center">
	<img src="grafica/MeteoCal_Logo.gif" width="500" height="120"/>
</div>

<div align="center">
	<h:form>
	    <p:growl id="messages" showDetail="true" />
	 
	    <h:panelGrid columnClasses="value">
	        <h3 style="margin-top: 0">Calendar</h3>
	        <p:schedule id="schedule" value="#{meteoCalendar.eventModel}" widgetVar="myschedule" timeZone="GMT+2">
	 
	            <p:ajax event="dateSelect" listener="#{meteoCalendar.onDateSelect}" update="eventDialog" oncomplete="PF('eventDialog').show();" />
	 
	        </p:schedule>
	 
	    </h:panelGrid>
	 
	    <p:dialog widgetVar="eventDialog" header="Meteo Info" showEffect="clip" hideEffect="clip">
	        <h:panelGrid id="eventDialog" columns="2">
	        	Weather: #{meteoBean.getWeather(meteoCalendar.magic,"Milan")}<br></br>
	        	Max: #{meteoBean.getMaxTemp(meteoCalendar.magic,"Milan")}F<br></br>
	        	Min: #{meteoBean.getMinTemp(meteoCalendar.magic,"Milan")}F
	        </h:panelGrid>
	    </p:dialog>
	</h:form>
</div>

<div id="barraBottom" align="right">	
	
</div>

</h:body>
</html>
